package com.yuand.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yuand.entity.SysUser;
import com.yuand.mapper.SysUserMapper;
import com.yuand.service.SysUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
 * @author yuandong
 * @since 2021-08-06
 */
@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService {

    @Autowired
    private SysUserMapper sysUserMapper;

    public SysUser selectUserByName(String userName){
        return this.sysUserMapper.selectOne(new QueryWrapper<SysUser>().eq("user_name",userName));
    }

    @Override
    public int insert(SysUser sysUser) {
        return this.sysUserMapper.insert(sysUser);
    }

    ;

}
